package com.company.project.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.company.project.entity.SysUser;
import com.company.project.entity.TSeatsEntity;
import com.company.project.entity.TUserLogEntity;
import com.company.project.service.UserService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.company.project.mapper.TLoginLogMapper;
import com.company.project.entity.TLoginLogEntity;
import com.company.project.service.TLoginLogService;

import javax.annotation.Resource;


@Service("tLoginLogService")
public class TLoginLogServiceImpl extends ServiceImpl<TLoginLogMapper, TLoginLogEntity> implements TLoginLogService {
    @Resource
    private UserService userService;
    @Resource
    private TLoginLogMapper tLoginLogMapper;
    @Override
    public IPage<TLoginLogEntity> findListByPage(Page page, TLoginLogEntity tUserLog) {
        SysUser sysUser= userService.getUserInfo();
        TSeatsEntity tSeatsEntity = userService.getTSeats();
        IPage<TLoginLogEntity> iPage = tLoginLogMapper.selectByPage(page,tUserLog,sysUser);
        return iPage;
    }
}